home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 34
/
Aminet 34 (2000)(Schatztruhe)[!][Dec 1999].iso
/
Aminet
/
comm
/
irc
/
cybershiela.lha
/
cs
/
csc_scramble.amirx
< prev
next >
Wrap
Text File
|
1999-10-08
|
3KB
|
127 lines
/* shiela Online Games - letter scramble 1999 July - Zonkerz #amirc, #Starcafe Undernet
http://pages.cthome.net/amiga http://www.starcafe.org
*/
Options Results
signal on syntax
ponger=getclip('SCRAMBLE')
if ponger=1 then do;'say 5Word Scramble game already in progress...';exit;end
call setclip('SCRAMBLE','1')
'say 5WoRd 4S3c9R4a9M3b4L9e 7V1.0'
getusers
allusers=result
call time('R')
call loadscramble
SCRAMBLEWORD:
kk=random(1,max,time('s'))
correct=upper(u.kk)
signal SCRAMBLEIT2
COMEHERE:
'say 3the scrambled letters are: 6'messedup
'say 4!guess {word} 3to try to guess the word, You have 60 seconds to guess correctly.4!Pass3 ends this round.'
HuHuhLoopit:
krv=time('E')
if krv>60 then signal timeout
if krv>40 & krv<50 then 'say 3You have less than 20 seconds remaining...'
getmynick
mynick=result
'userhost 'mynick
myhost=result
xxk=pos('@',myhost)
myfront=substr(myhost,1,xxk-1)
drop comm
drop dest
drop text
drop prefix
drop nick
drop rest
getchannel
channam=Upper(result)
'getline'
text=line
prefix=line.prefix
comm=line.command
dest=line.dest
rest=line.rest
xv=pos('!',prefix,1)
if xv>0 then do;nick=left(prefix,xv-1);end
msgr=nick
if upper(left(comm,4))="PRIV" then signal PRIVMSG
signal huhuhloopit
PRIVMSG:
getmynick
mynick=upper(result)
xv=pos('!',prefix,1)
if xv>0 then do;nick=left(prefix,xv-1);end
BIG=upper(rest)
xr=pos('!GUESS ',BIG)
if xr>0 then signal GUESSWORD
BIG=upper(rest)
xr=pos('!PASS',BIG)
if xr>0 then do;'say 7Word has been Passed';signal TIMEOUT;end
signal huhuhloopit
GUESSWORD:
guess2=word(big,2)
guess=upper(guess2)
if words(big)<2 then do;'say 3sorry 'nick' what were you saying?';signal huhuhloopit;end
if guess=correct then do;'say 6Your Right 'nick'!';end
if guess~=correct then do;'say 3Sorry 'nick' that is Incorrect.';signal huhuhloopit;end
signal quit
LOADSCRAMBLE:
kk=1
getprogdir
dir=result
config=dir||"/rexx/cs/wordscramble.db"
if ~exists(config) then do;'echo c=3 p=CShiela Scramble File Not Found - Program Halted';call setclip('SCRAMBLE','0');exit;end
call open(fle,config,'R')
do until eof(fle)
u.kk=readln(fle)
kk=kk+1
end
max=kk-2
call close(fle)
return
Timeout:
'say 4BZZZZ No one guessed the word correctly...The word was 6'correct'.'
quit:
'say 3Type 6!Scramble 3to Play Again.'
call setclip('SCRAMBLE','0')
exit
/* Scrambling word tester */
SCRAMBLEIT2:
'say 6ScRaMbLiNG the Word now....please wait...'
word=correct
wlen=length(word)
wfill=""
wempty=left(wfill,wlen,".")
SCRAMBLEIT:
do i=1 to wlen
u.i=substr(word,i,1)
end
max=wlen
i=1
CARROT:
p=random(1,wlen,time('s'))
if substr(wempty,p,1)="." then do;wempty2=overlay(u.i,wempty,p,1);wempty=wempty2;i=i+1;end
if i=max+1 then signal finishedword
signal carrot
FINISHEDWORD:
messedup=wempty
signal comehere